#coding:utf-8
class WifiLog < ActiveRecord::Base
  belongs_to :wifi_account
  belongs_to :account
  attr_accessible :end_at, :ip, :mac, :start_at, :account_id, :wifi_account_id, :imei

  def current_status
    if end_at.nil?
      '使用中'
    elsif accident
      '异常下线'
    else
      '使用完毕'
    end        
  end
end
